import React from 'react';

import './index.css';
import LayoutView, { LayoutMode } from '../layout';
import Advice from './Advice';
import Detail from './Detail';
import Simulation from './Simulation';
import ReportTab from '../report-tab/ReportTab';

/**
 * 結果詳細：大腸がん
 */
const ReportColorectalCancer = ({ inputData, risk, initialRisk, advice, healthy, onCalcRisk, onCancel, defaultSection }) => (
  <LayoutView
    mode={LayoutMode.DETAIL}
    title="大腸がんリスク"
    handleBack={onCancel}
    riskLevel={initialRisk.probability.riskLevel}
    className="ReportColorectalCancer"
  >
    <ReportTab
      category="大腸がん"
      defaultSection={defaultSection}
      detailRender={() => (
        <Detail {...initialRisk} />
      )}
      adviceRender={() => (
        <Advice {...advice} />
      )}
      simulationRender={() => (
        <Simulation
          inputData={inputData}
          risk={risk}
          initialRisk={initialRisk}
          healthy={healthy}
          onCalcRisk={onCalcRisk}
        />
      )}
    />
  </LayoutView>
)
/*
ReportColorectalCancer.propTypes = {
  inputData: React.PropTypes.object.isRequired,
  risk: React.PropTypes.shape({
    probability: React.PropTypes.shape({
      you: React.PropTypes.number.isRequired,
      ave: React.PropTypes.number.isRequired,
      min: React.PropTypes.number.isRequired,
      max: React.PropTypes.number.isRequired,
    }),
  }),
  initialRisk: React.PropTypes.shape({
    probability: React.PropTypes.shape({
      you: React.PropTypes.number.isRequired,
      ave: React.PropTypes.number.isRequired,
      min: React.PropTypes.number.isRequired,
      max: React.PropTypes.number.isRequired,
    }),
  }),
  advice: React.PropTypes.shape({
    alcoholAdvices: React.PropTypes.string,
    smokingAdvices: React.PropTypes.string,
    bmiAdvices: React.PropTypes.string,
    physicalActivityAdvices: React.PropTypes.string,
  }),
  onCalcRisk: React.PropTypes.func,
  onCancel: React.PropTypes.func,
  defaultSection: React.PropTypes.string,
  healthy: React.PropTypes.shape({
    good: React.PropTypes.array,
    bad: React.PropTypes.array,
  }),
};*/

export default ReportColorectalCancer
